<template>
  <div ref="bar" style="width: 100%;height: 300px;">

  </div>
</template>

<script>
  import * as echarts from 'echarts'
  export default {
    name:'',
    mounted(){
      let chars = echarts.init(this.$refs.bar)
      chars.setOption({
            title:{
              text:"销售额趋势"
            },
            tooltip: {
              trigger: 'axis',
              axisPointer: {
                type: "shadow"
              }
            },
            grid: {
              left: '0%',
              right: '0%',
              bottom: '0%',
              containLabel: true
            },
            xAxis: [{
                type: 'category',
                data: ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月',],
                  axisTick: {
                    alignWithLabel: true
                  }
                }
              ],
              yAxis: [{
                type: 'value'
              }],
              series: [{
                  name: 'Direct',
                  type: 'bar',
                  barWidth: '60%',
                  data: [10, 52, 200, 334, 390, 33,40,999,10,19,321,44]
                  }
                ]
              })
    }
  }
</script>

<style>
</style>
